<nav class="navbar-default navbar-static-side" role="navigation">
    <div class="nav-close"><i class="fa fa-times-circle"></i>
    </div>
    <div class="sidebar-collapse">
        <ul class="nav" id="side-menu">
            <li>
                <div class="logo-element">
                    <#if isShowLogo>
                     ${indexPageTitle}
                    </#if>
                </div>
            </li>
            <li class="nav-header">
                <div class="dropdown profile-element">
                    <a href="javascript:" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown">
                        <img alt="image" class="img-circle" src="http://cn.inspinia.cn/html/inspiniacn/hplus/img/profile_small.jpg" />
                        <span class="clear">
                           <span class="block m-t-xs"><strong class="font-bold"><@shiro.principal property="userName" /></strong></span>
                           <span class="text-muted text-xs block"><@shiro.principal property="email" /> <b class="caret"></b></span>
                        </span>
                    </a>
                    <ul class="dropdown-menu animated fadeInRight m-t-xs">
                        <li class="mt5">
                            <a href="http://cn.inspinia.cn/html/inspiniacn/hplus/profile.html" class="menuItem">
                                <i class="fa fa-user"></i> 个人中心</a>
                        </li>
                        <li>
                            <a onclick="resetPwd()" class="menuItem">
                                <i class="fa fa-key"></i> 修改密码</a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="/logout">
                                <i class="fa fa-sign-out"></i> 退出登录</a>
                        </li>
                    </ul>
                </div>
            </li>
        </ul>
    </div>
</nav>
<script id="MenuTemp" type="text/html">
    {{each data as first i}}
    {{if (first.pid==1)}}
    <!--Menu list item-->
    <li>
        <a href="javascript:;">
            <i class="{{first.icon}}"></i>
            <span class="nav-label">{{first.name}}</span>
            {{if first.hasChildren}}
            <span class="fa arrow"></span>
            {{/if}}
        </a>
        <!--Submenu-->
        <ul class="nav nav-second-level collapse">
            <!--第2级-->
            {{each data as second j}}
            {{if (second.pid==first.id)}}
            <li>
                <a data-index="{{second.id}}" href="{{second.url}}" class="J_menuItem"><i class="{{second.icon}}"></i><span class="nav-label">{{second.name}}</span>
                    {{if second.hasChildren}}
                    <span class="fa arrow"></span>{{/if}}</a>
                <!--第三级-->
                <!--Submenu-->
                <ul class="nav nav-third-level">
                    {{each data as third}}
                    {{if (third.pid==second.id)}}
                    <li>
                        <a data-index="{{third.id}}" href="{{third.url}}" class="J_menuItem"><i class="{{third.icon}}"></i><span class="nav-label"></span>{{third.name}}
                            {{if third.hasChildren}}
                            <span class="fa arrow"></span>{{/if}}</a>
                    </li>
                    {{/if}}
                    {{/each}}
                </ul>
            </li>
            {{/if}}
            {{/each}}
        </ul>
    </li>
    {{/if}}
    {{/each}}
</script>

